package com.kungfuhacking.wristbandpro.net;


import com.kungfuhacking.wristbandpro.base.bean.Basebean;
import com.kungfuhacking.wristbandpro.base.bean.HttpListResult;
import com.kungfuhacking.wristbandpro.base.bean.HttpResult;
import com.kungfuhacking.wristbandpro.base.bean.RequestBean;
import com.kungfuhacking.wristbandpro.base.bean.UploadBean;
import com.kungfuhacking.wristbandpro.chat.bean.UserListBean;
import com.kungfuhacking.wristbandpro.find.bean.ConfirmBean;
import com.kungfuhacking.wristbandpro.find.bean.ConfirmRecordBean;
import com.kungfuhacking.wristbandpro.find.bean.LogisticsBean;
import com.kungfuhacking.wristbandpro.find.bean.OrderDetailBean;
import com.kungfuhacking.wristbandpro.find.bean.PayBean;
import com.kungfuhacking.wristbandpro.find.bean.ProductsInfo;
import com.kungfuhacking.wristbandpro.location.bean.AffectionBean;
import com.kungfuhacking.wristbandpro.location.bean.HistoryResBean;
import com.kungfuhacking.wristbandpro.location.bean.OldEntity;
import com.kungfuhacking.wristbandpro.location.bean.SafeAreaBean;
import com.kungfuhacking.wristbandpro.location.bean.ShareBean;
import com.kungfuhacking.wristbandpro.login.bean.LoginBean;
import com.kungfuhacking.wristbandpro.mqtt.bean.MqttServiceBean;
import com.kungfuhacking.wristbandpro.my.bean.CreateBean;
import com.kungfuhacking.wristbandpro.my.bean.FamilyData;
import com.kungfuhacking.wristbandpro.my.bean.OldDetail;

import io.reactivex.Observable;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Url;

//import com.kungfuhacking.wristbandpro.find.bean.OrlderListBean;


/**
 * 请求的接口
 * Created by Aaron on 17/2/14.
 */

public interface ApiService {

    String API_HOST = "https://api1.kungfuhacking.cn";
    //    String API_HOST = "https://test.healxh.cn";//黄手环正式服务器
//    String API_HOST = "https://api2.kungfuhacking.cn";//黄手环正式服务器
    String INDEX_HOST = "https://kungfuhacking.cn";//主页host
    //    String API_HOST = "https://test.healxh.cn";//测试 api host
//    String WEB_ROOT = API_HOST + "/y_a_1.1.5.2/";
    String WEB_ROOT = API_HOST + "/y_a_1.1.7/";
//    String WEB_ROOT_TALK = WEB_ROOT;

    String CLAUSE_IP = "https://www.kungfuhacking.cn/lisence";//注册协议
    String DONATE = INDEX_HOST + "/donation/";//捐赠
    String QA = INDEX_HOST + "/QA/";//QA 客服中心
//    String ID_CONFIRME = INDEX_HOST + "/phoneNumIdentity";//实名认证
    String QUESTIONNAIRE = INDEX_HOST + "/questionnaire";//问卷调查
    String CHARGE_PAGE = "http://shop.10086.cn/i/?f=rechargeinterofth";//充值页面

    //登录
    @POST("login")
    Observable<LoginBean> login(@Body RequestBean data);

    //获取验证码
    @POST("smsCode")
    Observable<Basebean> getSmsCode(@Body RequestBean data);

    //注册验证
    @POST("regCheck")
    Observable<LoginBean> regCheck(@Body RequestBean data);

    //注册
    @POST("reg")
    Observable<LoginBean> reg(@Body RequestBean data);

    //验证验证码(忘记密码时的验证)
    @POST("forgetCheck")
    Observable<LoginBean> forgetCheck(@Body RequestBean data);

    //设置新密码
    @POST("forget")
    Observable<Basebean> forget(@Body RequestBean data);

    //获取所有绑定的手表的信息
    @POST("getChildernAndWatch")
    Observable<HttpListResult<OldEntity>> getChildernAndWatch(@Body RequestBean data);

    //获取所有绑定的手表的信息
    @POST("setWatchPhoneNum")
    Observable<Basebean> setWatchPhoneNum(@Body RequestBean data);

    //获取定位信息
    @POST("getChildLoc")
    Observable<HttpListResult<OldEntity>> getChildLoc(@Body RequestBean data);

    //获取亲情号码
    @POST("getWhiteList")
    Observable<AffectionBean> getWhiteList(@Body RequestBean data);

    //更新亲情号码
    @POST("updateWhiteList")
    Observable<Basebean> updateWhiteList(@Body RequestBean data);

    //删除老人
    @POST("delChild")
    Observable<Basebean> delChild(@Body RequestBean data);

    //查找手表
    @POST("findWatch")
    Observable<Basebean> findWatch(@Body RequestBean data);

    //获取安全区域列表
    @POST("getAreaList")
    Observable<SafeAreaBean> getAreaList(@Body RequestBean data);

    //删除安全区域
    @POST("delArea")
    Observable<Basebean> delArea(@Body RequestBean data);

    //添加安全区域围栏
    @POST("addArea")
    Observable<Basebean> addArea(@Body RequestBean data);

    //解绑手表
    @POST("delWatch")
    Observable<Basebean> delWatch(@Body RequestBean data);

    //获取邀请码
    @POST("getInviteKey")
    Observable<ShareBean> getInviteKey(@Body RequestBean data);

    //获取历史轨迹
    @POST("getChildLocList")
    Observable<HistoryResBean> getChildLocList(@Body RequestBean data);

    //输入IEMI码 绑定手表
    @POST("addWatch")
    Observable<Basebean> addWatch(@Body RequestBean data);

    //扫描二维码后 绑定手表
    @POST("bindYellow")
    Observable<Basebean> bindYellow(@Body RequestBean data);

    //获取支付套餐列表
    @POST("productList")
    Observable<ProductsInfo> productList(@Body RequestBean data);

    //支付
    @POST("pay")
    Observable<PayBean> pay(@Body RequestBean data);

//    //订单列表
//    @POST("payHistory")
//    Observable<OrlderListBean> payHistory(@Body RequestBean data);

    //手机号码的订单详情
    @POST("phoneNumInfo")
    Observable<OrderDetailBean> phoneNumInfo(@Body RequestBean data);

    //查看物流详情
    @POST("checkExpress")
    Observable<LogisticsBean> checkExpress(@Body RequestBean data);

    //上传七牛图片
    @POST("uploadToken")
    Observable<UploadBean> uploadToken(@Body RequestBean data);

    //修改个人信息
    @POST("updateUserInfo")
    Observable<Basebean> updateUserInfo(@Body RequestBean data);

    //修改密码
    @POST("updatePwd")
    Observable<Basebean> updatePwd(@Body RequestBean data);

    //获取我关注的老人列表
    @POST("getChildrenInfo")
    Observable<HttpListResult<OldEntity>> getChildrenInfo(@Body RequestBean data);

    //通过邀请码绑定老人
    @POST("checkInviteKey")
    Observable<Basebean> checkInviteKey(@Body RequestBean data);

    //创建新空间
    @POST("createChild")
    Observable<CreateBean> createChild(@Body RequestBean data);

    //获取mqtt登录的ip
    @POST("talkLogin")
    Observable<MqttServiceBean> talkLogin(@Body RequestBean data);

//    //我的好友
//    @POST("myContacts")
//    Observable<AddressBean> myContacts(@Body RequestBean data);

//    //群聊列表
//    @POST("groupList")
//    Observable<GroupBean> groupList(@Body RequestBean data);

//    //搜索好友
//    @POST("searchUser")
//    Observable<SearchContract> searchUser(@Body RequestBean data);

//    //发送好友申请
//    @POST("inviteFriend")
//    Observable<Basebean> inviteFriend(@Body RequestBean data);

//    //删除好友
//    @POST("delFriend")
//    Observable<Basebean> delFriend(@Body RequestBean data);

//    //邀请列表
//    @POST("invitedList")
//    Observable<InviteBean> invitedList(@Body RequestBean data);

//    //处理好友请求
//    @POST("dealInvite")
//    Observable<Basebean> dealInvite(@Body RequestBean data);

//    //家庭圈
//    @POST("childTalkList")
//    Observable<FamilyGroupBean> childTalkList(@Body RequestBean data);

//    //创建群组
//    @POST("joinGroup")
//    Observable<TopicBea> joinGroup(@Body RequestBean data);

    //群信息
    @POST("groupInfo")
    Observable<UserListBean> groupInfo(@Body RequestBean data);

//    //退出群聊
//    @POST("leftGroup")
//    Observable<Basebean> leftGroup(@Body RequestBean data);

//    //修改群主
//    @POST("updateGroupAdmin")
//    Observable<Basebean> updateGroupAdmin(@Body RequestBean data);

    //群设置
    @POST("groupSetting")
    Observable<CreateBean> groupSetting(@Body RequestBean data);

    //获取老人详细数据
    @POST("getChildInfo")
    Observable<OldDetail> getChildInfo(@Body RequestBean data);

    //权限调整
    @POST("updateLevel")
    Observable<Basebean> updateLevel(@Body RequestBean data);

    //下载图片
    @GET
    Observable<ResponseBody> downloadPicFromNet(@Url String fileUrl);

    //修改老人信息
    @POST("updateChildInfo")
    Observable<Basebean> updateChildInfo(@Body RequestBean data);

    //获取绑定老人的家庭信息
    @POST("getChildFamilyInfo")
    Observable<HttpResult<FamilyData>> getChildFamilyInfo(@Body RequestBean data);

    //更新老人家庭信息
    @POST("updateChildFamilyInfo")
    Observable<Basebean> updateChildFamilyInfo(@Body RequestBean data);

    //获取认证信息列表
    @POST("identityList")
    Observable<ConfirmRecordBean> identityList(@Body RequestBean data);

    //检查号码接口1
    @POST("checkPhoneNum")
    Observable<ConfirmBean> checkPhoneNum(@Body RequestBean data);

    //检查号码接口2 扫描imei吗认证
    @POST("checkIMEI")
    Observable<ConfirmBean> checkIMEI(@Body RequestBean data);

    //实名认证
    @POST("identityPhoneNum")
    Observable<PayBean> identityPhoneNum(@Body RequestBean data);

    //是否推送消息
    @POST("updateUserPushState")
    Observable<Basebean> updateUserPushState(@Body RequestBean data);

//    @POST
//    @Multipart
//    Observable<Basebean> uploadFile(@Part("file\"; filename=\"avatar.png\"") RequestBody file);

}
